package main

import (
	"go-ws-server/config"
	"go-ws-server/ws/handler"

	"github.com/gin-gonic/gin"
)

func main() {

	// 初始化数据库连接
	config.InitMySQL()

	// 初始化 Redis
	config.InitRedis()

	// initData.SyncRedisData()

	r := gin.Default()

	// WebSocket 连接
	r.GET("/ws", handler.HandleWebSocket)

	r.Run(":8888")
}
